import React from 'react';
import B from './b';

class A extends React.Component {
    constructor() {
        super()
        this.state = {
            name: 1024
        }
    }

    changeState = () => {
        this.setState({
            name: 123
        })
    }

    render() {
        return (
            <div>
                <B name={this.state.name} />
                <span onClick={this.changeState}>changeState</span>
            </div>
        )
    }
}

export default A;
